package jee.boot.module.act.service;

import jee.boot.common.basic.CrudService;
import jee.boot.common.basic.Page;
import jee.boot.common.standard.AuthorityHandler;
import jee.boot.entity.activiti.ActTaskInst;
import jee.boot.entity.system.Filter;
import jee.boot.module.act.dao.ActTaskInstDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ActTaskInstService extends CrudService<ActTaskInstDao, ActTaskInst> {
    @Autowired
    private AuthorityHandler authorityHandler;
    @Override
    public Page<ActTaskInst> findPage(ActTaskInst entity) {
        entity.addFilter(new Filter("assignee","=",authorityHandler.getUserId()));
        return super.findPage(entity);
    }
}
